Method and system for efficient updating of data in a linked node system

ABSTRACT

In general, embodiments of the invention relate to storing data and managing the stored data in linked nodes. Managing the data in the linked nodes includes updating erasure coded data in a manner that reduces the transmission of data chunks and parity chunks between the linked nodes.

BACKGROUND

Computing devices may generate data during their operation. For example,applications hosted by the computing devices may generate data used bythe applications to perform their functions. Such data may be stored inpersistent storage of the computing devices. Failure of the persistentstorage may result in data loss.

SUMMARY

In general, in one aspect, the invention relates to a method formanaging data, comprising receiving, by a node, an updated data chunk,wherein the node comprising a data chunk, wherein the data chunk is aprior version of the updated data chunk; identifying a second nodecomprising a parity chunk associated with the data chunk; transmitting,by the node, the data chunk and the updated data chunk to the secondnode; generating, the second node, an updated parity chunk using thedata chunk and the updated data chunk; and storing the updated paritychunk on the second node.

In general, in one aspect, the invention relates to a non-transitorycomputer readable medium comprising computer readable program code,which when executed by a computer processor enables the computerprocessor to perform a method for storing data, a method comprisingreceiving, by a node, an updated data chunk, wherein the node comprisinga data chunk, wherein the data chunk is a prior version of the updateddata chunk; identifying a second node comprising a parity chunkassociated with the data chunk; transmitting, by the node, the datachunk and the updated data chunk to the second node; generating, thesecond node, an updated parity chunk using the data chunk and theupdated data chunk; and storing the updated parity chunk on the secondnode.

In general, in one aspect, the invention relates to a system,comprising: a first physical node comprising a data chunk; and a secondphysical node comprising a parity chunk. The first physical node isconfigured to: receive an updated data chunk, wherein the data chunk isa prior version of the updated data chunk, identify that the second nodecomprises the parity chunk; and transmit the data chunk and the updateddata chunk to the second physical node. The second physical node isconfigured to: generate an updated parity chunk using the data chunk andthe updated data chunk; and store the updated parity chunk on the secondphysical node.

BRIEF DESCRIPTION OF DRAWINGS

Certain embodiments of the invention will be described with reference tothe accompanying drawings. However, the accompanying drawings illustrateonly certain aspects or implementations of the invention by way ofexample and are not meant to limit the scope of the claims.

FIG. 1 shows a diagram of a system in accordance with one or moreembodiments of the invention.

FIG. 2 shows a diagram of a node in accordance with one or moreembodiments of the invention.

FIG. 3 shows a diagram of single-chain configuration in accordance withone or more embodiments of the invention.

FIG. 4 shows a diagram of dual-chain configuration in accordance withone or more embodiments of the invention.

FIG. 5 shows a flowchart of a method of discovering data protectiondomain information in accordance with one or more embodiments of theinvention.

FIG. 6 shows a flowchart of a method of storing data in nodes inaccordance with one or more embodiments of the invention.

FIG. 7 shows a diagram of an example of storing data in nodes inaccordance with one or more embodiments of the invention.

FIG. 8 shows a flowchart of a method of storing data in nodes inaccordance with one or more embodiments of the invention.

FIG. 9 shows a diagram of an example of storing data in nodes inaccordance with one or more embodiments of the invention.

FIGS. 10.1-10.2 show flowcharts of a method of storing data in nodes inaccordance with one or more embodiments of the invention.

FIG. 11 shows a diagram of an example of storing data in nodes inaccordance with one or more embodiments of the invention.

FIG. 12 shows a flowchart of a method of storing data in nodes inaccordance with one or more embodiments of the invention.

FIG. 13 shows a flowchart of a method of rebuilding data in nodes inaccordance with one or more embodiments of the invention.

FIGS. 14.1-14.3 show diagrams of an example of storing data andrebuilding data in nodes in accordance with one or more embodiments ofthe invention.

FIG. 15 shows a flowchart of a method of storing data in nodes inaccordance with one or more embodiments of the invention.

FIGS. 16.1-16.3 show diagrams of an example of storing data in nodes inaccordance with one or more embodiments of the invention.

FIG. 17 shows a diagram of a computing device in accordance with one ormore embodiments of the invention.

DETAILED DESCRIPTION

Specific embodiments will now be described with reference to theaccompanying figures. In the following description, numerous details areset forth as examples of the invention. It will be understood by thoseskilled in the art that one or more embodiments of the present inventionmay be practiced without these specific details and that numerousvariations or modifications may be possible without departing from thescope of the invention. Certain details known to those of ordinary skillin the art are omitted to avoid obscuring the description.

In the following description of the figures, any component describedwith regard to a figure, in various embodiments of the invention, may beequivalent to one or more like-named components described with regard toany other figure. For brevity, descriptions of these components will notbe repeated with regard to each figure. Thus, each and every embodimentof the components of each figure is incorporated by reference andassumed to be optionally present within every other figure having one ormore like-named components. Additionally, in accordance with variousembodiments of the invention, any description of the components of afigure is to be interpreted as an optional embodiment, which may beimplemented in addition to, in conjunction with, or in place of theembodiments described with regard to a corresponding like-namedcomponent in any other figure.

In general, embodiments of the invention relate to storing data (e.g., afile(s), a block(s), a blob(s), etc.) and managing the stored data inlinked nodes. More specifically, embodiments of the invention relate tonodes linked together in a daisy chain configuration such as, but notlimited to, a single-chain configuration and a dual-chain configuration,which use data protection domain (DPD) information to determine whereand/or how to store the data. The nodes include functionality togenerate the DPD information by discovering to which other nodes theyare connected. The DPD information may then be used to enable dataprotection of the data stored in the linked nodes. For example, the dataprotection may take the form of replication (e.g., multiple copies ofthe data may be stored across different nodes) or the form of erasurecoding (e.g., data protection using one or more parity values). Inaddition, the nodes may include functionality to dynamically update theDPD information based on state changes of the various nodes (e.g., oneor more nodes become unreachable or a new node is added to the cluster).As a result, the nodes are able to dynamically adjust where and/or howdata is stored across the nodes using the updated DPD information.

FIG. 1 shows a diagram of a system in accordance with one or moreembodiments of the invention. The system includes one or more clientdevices (100A, 100M), a data processor (102), and a cluster (104). Thecomponents of the system of FIG. 1 may be operably connected to eachother (and/or other components) via any combination of wired and/orwireless networks. Each component of the system of FIG. 1 is discussedbelow.

The client devices (100) may be implemented using computing devices. Thecomputing devices may be, for example, mobile phones, tablet computers,laptop computers, desktop computers, servers, or cloud resources. Thecomputing devices may include one or more processors, memory (e.g.,random access memory), and persistent storage (e.g., disk drives, solidstate drives, etc.). The persistent storage may store computerinstructions, e.g., computer code, that (when executed by theprocessor(s) of the computing device) cause the computing device toperform the functions described in this application. The client devices(100) may be implemented using other types of computing devices withoutdeparting from the invention. For additional details regarding computingdevices, see e.g., FIG. 17.

The client devices (100) may be implemented using logical deviceswithout departing from the invention. For example, the client devices(100) may be implemented using virtual machines that utilize computingresources of any number of physical computing devices (see e.g., FIG.17) to provide their respective functionalities. The client devices(100) may be implemented using other types of logical devices withoutdeparting from the invention.

In one or more embodiments of the invention, the client devices (100)include functionality to issue request (e.g., read and write requests)to the data processor (102) and/or directly to cluster (104) (or, morespecifically, the one or more nodes in the cluster).

The data processor (102) may be implemented using computing devices. Thecomputing devices may be, for example, mobile phones, tablet computers,laptop computers, desktop computers, servers, or cloud resources. Thecomputing devices may include one or more processors, memory (e.g.,random access memory), and persistent storage (e.g., disk drives, solidstate drives, etc.). The persistent storage may store computerinstructions, e.g., computer code, that (when executed by theprocessor(s) of the computing device) cause the computing device toperform the functions described in this application. The data processor(102) may be implemented using other types of computing devices withoutdeparting from the invention. For additional details regarding computingdevices, see e.g., FIG. 17.

The data processor (102) may be implemented using logical deviceswithout departing from the invention. For example, the data processor(102) may be implemented using virtual machines that utilize computingresources of any number of physical computing devices (see e.g., FIG.17) to provide their respective functionalities. The data processor(102) may be implemented using other types of logical devices withoutdeparting from the invention.

In one or more embodiments of the invention, the data processor (102)includes functionality to receive requests from the clients and thensend corresponding requests to the cluster (104). Additionally, oralternatively, the data processor, may also include functionality toissues its own requests (e.g., read and/or write requests) to thecluster. The data processor (102) may also include functionality toobtain DPD information from the various nodes in the cluster (alsoreferred to as node-specific DPD information) and then combine theaforementioned DPD information to generate aggregated DPD information(discussed below). The data processor (102) may then use the aggregatedDPD information to: (i) determine in which nodes to store copies of data(see e.g., FIGS. 8-9) and (ii) facilitate the storage of updated datachunks, which are protected using erasure coding, in a manner thatminimizes the transmission of various associated data chunks and paritychunks between the nodes (see e.g., FIGS. 15-16.3).

In one or more embodiments of the invention, the nodes, using thenode-specific DPD information (described below), are able to store datawithout the requirement of a data processor (102) to manage the storageprocessor. See e.g., FIGS. 6, 7, and 10-14C. In such scenarios, the dataprocessor's (102) role may be limited to facilitating the communicationof requests and corresponding responses from between the client devices(100) and the cluster (104).

The cluster (104) includes multiple nodes (106A, 106M). Each node in thecluster (104) is physically connected to at least two other nodes in thecluster (104). The number of nodes to which a given node is physicallyconnected may vary based on the specific configuration of the nodes. Forexample, if the nodes are connected in a single-chain configuration (seee.g., FIG. 3), then each node is connected to two other nodes. However,if the nodes are connected in a dual-chain configuration (see e.g., FIG.4), then each node may be connected to up to four other nodes. Thespecific number of connections that each node has to other nodes(regardless of configuration) may vary based on the number of nodes inthe cluster and/or with the number of communication interfaces on eachof the nodes. The nodes may be connected using other configurationswithout departing from the invention. The nodes (106A, 106M) includefunctionality to perform the functions described in this applicationand/or all, or a portion, of the methods or examples illustrated inFIGS. 5-16.3. Additional detail about the nodes is provided below inFIG. 2.

While the system of FIG. 1 has been illustrated and described asincluding a limited number of specific components, a system inaccordance with one or more embodiments of the invention may includeadditional, fewer, and/or different components without departing fromthe invention.

FIG. 2 shows a diagram of a node in accordance with one or moreembodiments of the invention. The node (200) includes one or moreprocessors (not shown), memory (e.g., random access memory (not shown)),a node management engine (202), persistent storage (204), dataprotection domain (DPD) information (206), communication interfaces(208), and optionally one or more applications (210). Each of thesecomponents is described below.

The node management engine (202) includes functionality to: (i) generateand maintain the node-specific DPD information (see e.g., FIGS. 5-6) and(ii) process requests received from client devices (100), the dataprocessor (102), from one or more applications (210), and/or from one ormore other nodes to which it is connected (see e.g., FIGS. 5-16.3).

In one embodiment of the invention, the node may include instructions,stored on the persistent storage (described below), that when executedby the processor(s) of the node cause the node to perform thefunctionality of the node management engine (202) described throughoutthis application and/or all, or a portion thereof, of the methodsillustrated in FIGS. 5-16.3.

In one embodiment of the invention, the node management engine (202) maybe implemented using special purpose hardware devices such as, forexample, programmable gate arrays, application specific integratedcircuits, or another type of hardware device that provides thefunctionality of the node management engine by including circuitryadapted to provide the aforementioned functionality. In anotherembodiment of the invention, the node management engine may beimplemented using a combination of computer readable instructions (e.g.,program code) and special purpose hardware devices that cooperativelyprovide the functionality of the node management engine.

The persistent storage (204) includes any number of non-volatile storagedevices including, but not limited to, magnetic memory devices, opticalmemory devices, solid state memory devices, phase change memory devices,any other suitable type of persistent memory device, or any combinationthereof. The persistent storage may store data received from the clientdevices (100), the data processor (102), from applications executing onthe node (200), and/or from other nodes (106A, 106M) in the cluster.

The data protection domain (DPD) information (206) (also referred to asnode-specific DPD information) specifies information about the othernodes to which the node (200) is connected (i.e., via the communicationinterfaces (208)). The DPD information may include, but is not limitedto: (i) the name of each node to which the node (200) is connected; (ii)a communication interface identifier (ID) that specifies thecommunication interface on the node (200) that is connected to the node(i.e., the node that is specified in (i)); and an address of the node(i.e., the node that is specified in (i)). The content and format of theaddress may vary based on the communication protocol that is beingimplemented between the nodes. An example of an address in an InternetProtocol (IP) address.

The DPD information (206) may also include other information such as,but not limited to, (i) a listing of all supported erasure codingschemes (see e.g., FIGS. 12-14C), (ii) a default (or selected) erasurecoding scheme (see e.g., FIGS. 12-14C), (iii) a specification of areplica path(s) (see e.g., FIGS. 10.1-11), and/or (iv) a specificationof a chunk path(s) (see e.g., FIGS. 10.1-11). Each of the aforementionedadditional information that may be included in the DPD information isfurther described below.

In one embodiment of the invention, erasure coding is the use of parityvalues to protect data. The parity values are calculated using the dataand then stored with the data. If a portion of the data becomescorrupted, or is otherwise unavailable, the parity value(s) may be usedto rebuild the corrupted portion of the data.

In one or more embodiments of the invention, erasure coding includesdividing the obtained data into portions, referred to as data chunks.The individual data chunks may then be combined (or otherwise grouped)into slices. One or more parity values are then calculated for each ofthe aforementioned slices. The number of parity values may vary based onthe erasure coding scheme. An erasure coding scheme may be representedas the ratio of data chunks (M) to parity chunks (N) in each slice,e.g., M:N. Non-limiting examples of erasure coding schemes are 2:1, 2:2,3:1, 4:1, 9:5, etc. Other erasure coding schemes may be used withoutdeparting from the invention. Continuing with the above discussion, ifthe erasure code scheme is 3:1, then a single parity value iscalculated. The resulting parity value is then stored in a parity chunk.If erasure coding scheme requires multiple parity values to becalculated, then the multiple parity values are calculated with eachparity value being stored in a separate data chunk.

As discussed above, the data chunks are used to generate parity chunksin accordance with the erasure coding scheme. More specifically, theparity chunks may be generated by applying a predetermined function(e.g., P Parity function, Q Parity Function, etc.), operation, orcalculation to at least one of the data chunks. Depending on the erasurecoding scheme used, the parity chunks may include, but are not limitedto, P parity values and/or Q parity values.

In one embodiment of the invention, the P parity value is a Reed-Solomonsyndrome and, as such, the P Parity function may correspond to anyfunction that can generate a Reed-Solomon syndrome. In one embodiment ofthe invention, the P parity function is an XOR function.

In one embodiment of the invention, the Q parity value is a Reed-Solomonsyndrome and, as such, the Q Parity function may correspond to anyfunction that can generate a Reed-Solomon syndrome. In one embodiment ofthe invention, a Q parity value is a Reed-Solomon code. In oneembodiment of the invention, Q=g₀·D₀+g₁·D₁+g₂+ . . . +g_(n-1)·D_(n-1),where Q corresponds to the Q parity, g is a generator of the field, andthe value of D corresponds to the data in the data chunks.

Continuing with the discussion of DPD information, the listing of allsupported erasure coding schemes may be corresponding to either: (i) theerasure coding schemes that may be performed by the node, i.e., the nodeincludes the necessary functionality to store data using any of thesupported erasure coding schemes; or (ii) the erasure coding schemesthat may actually be implemented based on the number of nodes in thecluster. For example, if there are only three nodes in the cluster, thena 3:1 erasure coding scheme, which requires four nodes (e.g., threenodes to store data chunks and one node to store parity chunks) may notbe implemented.

If the listing of erasure coding schemes is all supported erasure codingschemes, then default erasure coding scheme that is specified is one ofthe supported erasure coding schemes that can actually be implemented inthe cluster. In scenarios in which the DPD information specifiesmultiple erasure coding schemes that may actually be implemented, theclient (or data processor) may specify which erasure coding scheme touse from the aforementioned set of implementable erasure coding schemesand, if no specific erasure coding scheme is specified, then the nodemay apply the default erasure coding scheme.

As discussed below in FIG. 5, the DPD information may be dynamicallyupdated based on state changes of the nodes (e.g., one or more nodes beunavailable or available). In these scenarios, the listing ofimplementable erasure coding schemes and/or the default erasure codingscheme may be updated based on the updates to the DPD information. Forexample, if the cluster initially included five nodes, then thesupported erasure coding schemes may be 4:1, 3:2, 3:1, 2:2 and 2:1 andthe default erasure coding scheme may be set to 3:1 (i.e., three datachunks to one parity chunk). However, if the number of nodes in thecluster decreases to three, then the supported erasure coding schemesmay be updated to only 2:1, which would also be specified as the defaulterasure coding scheme. If at a later point in time one additional nodebecomes active, then the supported erasure coding schemes may be updatedto 3:1 and 2:1, with 3:1 designated as the default erasure codingscheme. The invention is not limited to the aforementioned example.

Continuing with the discussion of DPD information, as discussed above,the DPD information may specify a replica path and a chunk path. Thereplica path corresponds to a logical or physical path over which areplica (e.g., a copy of file) is transmitted between nodes. The chunkpath corresponds to a logical or physical path over which a chunk(s) ofdata (e.g., portions of a file) are transmitted between nodes. Thereplica path may specify a set of nodes that are to receive replicasfrom the node (200) via the replica path. The chunk path may specify aset of nodes to receive data chunks from the node (200) via the chunkpath. In one embodiment of the invention, the DPD information mayspecify multiple replica paths, where the replica paths specifydifferent numbers of nodes, which determines the number of replicas thatare to be stored. For example, if there are six nodes in the cluster,then the cluster may support both a two-replica path (e.g., the clusterwill include two copies of a file) and a three-replica path (e.g., thecluster will include three copies of a file). The replica path that isselected may be based on: (i) number of nodes in the cluster, (ii)configuration of the node to use a particular replica path, and/or (iii)specification in the request (from a client or a data processor) to usea particular replica path. Additional detail about replica paths andchunk paths is provided below in FIGS. 10.1-11.

In one embodiment of the invention, the DPD information may be specifiedusing JavaScript Object Notation (JSON), eXtensible Markup Language(XML) or any other language or format without departing from theinvention.

The communication interfaces (208) may include any type of communicationinterface (208A, 208P) that enables a physical connection to beestablished between the node (200) and another node (not shown). Thecommunication interfaces (208) may be implemented using a combination ofphysical ports and corresponding hardware and/or software. The specifichardware and/or software used to implement the communication interfacesmay vary based on the communication protocol used. Examples ofcommunication protocols include, but are not limited to, Ethernet andInfiniband.

The applications (210) include any software application that includefunctionality to issue requests (e.g., read and/or write requests).Though not shown in FIG. 2, the application may be executing directly onthe node. Alternatively, the application may be executing on a virtualmachine or in a container, where the virtual machine or container areexecuting on the node.

While the node shown in FIG. 2 has been illustrated and described asincluding a limited number of specific components, a node in accordancewith one or more embodiments of the invention may include additional,fewer, and/or different components without departing from the invention.

As discussed above, the nodes may be linked together in a daisy chainconfiguration. FIGS. 3-4 show two example daisy chain configurations.Other daisy chain configurations may be implemented without departingfrom the invention.

FIG. 3 shows a diagram of single-chain configuration in accordance withone or more embodiments of the invention. In a single-chainconfiguration, each node is connected to two other nodes using distinctcommunication interfaces. For example, a node may implementcommunication interfaces using physical ports, where each port isconsidered a distinct communication interface. While the ports aredistinct, the additional hardware and/or software used to implement thecommunication interfaces may be shared between the ports.

Continuing with the discussion of FIG. 3, each node is physicallyconnected to two other nodes using two distinct physical paths. Forexample, Node A (300) is connected to Node B (302) using communicationinterface (CI) (308) and CI (310). Further, Node A (300) is connected toNode N (304) using CI (306) and CI (316). Similarly, Node B (302) andNode N (304) include CI (312) and CI (314), respectively, which may beconnected to other nodes (not shown) in the single-chain configuration.

The single-chain configuration results in each node have two immediateneighbors, i.e., two other nodes to which they are directly connected.Said another way, a given node may communicate with its immediateneighbors without having to transmit such communication via any otherinterposed node. In the single-chain configuration, the node along withits two immediate neighbors may be referred to as a data protectiongroup (DPG). A given node may be a member of up to three DPGs in asingle-node configuration. The node-specific DPD information that ismaintained by the node may include information about all nodes in theDPG.

FIG. 4 shows a diagram of dual-chain configuration in accordance withone or more embodiments of the invention. As shown in FIG. 4, in adual-chain configuration, each node is connected to four other nodesusing distinct communication interfaces. For example, a node mayimplement communication interfaces using physical ports, where each portis considered a distinct communication interface. While the ports aredistinct, the additional hardware and/or software used to implement thecommunication interfaces may be shared between the ports.

Continuing with the discussion of FIG. 4, each node, in the exampleshown in FIG. 4, is physically connected to four other nodes using fourdistinct physical paths using combinations (as shown) of the followingcommunication interfaces (410, 412, 414, 416, 418, 420, 422, 424, 426,428, 430, 432, 434, 436, 438, 440, 442, 444, 446, 448). For example,Node C (404) is connected to Node B (402), Node D (406), Node A (400)and Node E (408). Node C (404) is connected to Node B (402) and Node D(406) in a manner that is similar to the single-chain configuration inFIG. 3. However, Node C (404) is connected to Node A (400) and Node E(408) in a slightly different manner. Specifically, when viewed in thecontext of a single-node configuration Node A (400) would not beconsidered immediate neighbors of Node C (404) because Node B (402)would be interposed between Node C (404) and Node A (400). However, in adual-chain configuration, nodes that would not be considered immediateneighbors in a single-chain configuration are also directly connected toeach other thereby also making such nodes immediate neighbors. Saidanother way, in a single-chain configuration only nodes that are one hopfrom each other are directly connected and considered immediateneighbors, while in a dual-chain configuration nodes that are both onehop and two hops from a given node (when viewed from a single-chainconfiguration) are directly connected resulting in two additionalimmediate neighbors of the given node.

In this context, the DPG for a given node in a dual-chain configurationincludes up to four immediate neighbors. Further, each node may beassociated with up to five DPGs.

FIG. 5 shows a flowchart of a method of discovering data protectiondomain (DPD) information in accordance with one or more embodiments ofthe invention. The method shown in FIG. 5 may be performed on a per-nodebasis. Further, the method shown in FIG. 5 may be performed by the nodemanagement engine (or another component) in the node.

While FIG. 5 is illustrated as a series of steps, any of the steps maybe omitted, performed in a different order, additional steps may beincluded, and/or any or all of the steps may be performed in a paralleland/or partially overlapping manner without departing from theinvention.

In Step 500, neighbor information is obtained from nodes that aredirectly connected to the node (i.e., from immediate neighbor nodes).The neighbor information may be obtained from a node by requestinginformation from the node (e.g., IP address of the immediate neighbornode, the name of the immediate neighbor, etc.). In this scenario, thenode may issue a request from each of its communication interfaces (orfrom each of its active communication interfaces) and then track whatneighbor information is received from each request on aper-communication interface basis.

In another embodiment of the invention, each node may publish its ownneighbor information on each of its communication interfaces (or fromeach of its active communication interfaces). In this scenario, the nodemay track what neighbor information is received from on aper-communication interface basis.

In Step 502, DPD configuration information is obtained. The DPDconfiguration information may include information about erasure codingschemes that can be implemented on the node, a default erasure codingscheme to implement on the node, information about replica paths, andinformation about chunk paths. The DPD configuration information may bepre-loaded on the nodes and/or obtained from another node, a dataprocessor, an application, and/or from one or more clients. In someembodiments of the invention, the DPD configuration information is notrequired and, as such, no DPD configuration information is obtained.

In Step 504, node-specific DPD information is generated using theneighbor information and, if obtained, the DPD configurationinformation. The generation of the node-specific DPD informationincludes determining which neighbor information was received on whichcommunication interface and then generating node-specific DPDinformation. At this stage, the node-specific information may correspondto a data structure that is populated with neighbor information as wellas the communication interface on the node over which the correspondingneighbor is connected. Once the data structure is populated with theaforementioned information about the immediate neighbors, theninformation related to the erasure coding schemes and/or informationrelated to the replica paths and chunk paths may be added to thenode-specific DPD information.

Other methods for generating the node-specific DPD information may beused without departing from the invention.

In Step 506, the node-specific DPD information may be published toexternal entities. In this context, the external entities may be othernodes in the cluster, the data processor, clients, and/or applicationsexecuting on the node and/or other nodes. As discussed above, externalentities may obtain node-specific DPD information from various nodes ina cluster and then generate aggregated DPD information (which may beaggregated for all nodes in a cluster or at other levels of granularitysuch as for a subset of the nodes the cluster). The aggregated DPDinformation includes a listing of all nodes (or a subset of nodes) inthe cluster (or at least all nodes that are specified in thenode-specific DPD information upon which the aggregated DPD informationis based) as well as information about how each node is connected toother nodes in the cluster. This aggregated DPD information may be usedby the external entities to aid in the storage or recovery of data inaccordance with one or more embodiments of the invention.

As discussed above, the node-specific DPD information may be dynamicallyupdated by each of the nodes. The dynamic updating allows the nodes tomaintain up-to-date DPD information. Said another way, if theconnectivity of the nodes in the cluster changes, e.g., one or morenodes becomes unreachable or unavailable, then node-specific DPDinformation is updated to reflect this change. As described below, theupdated DPD information may then be used to service requests. Theupdating of the DPD information may be done in a manner that ensuresthat the requests are always processed using the most up-to-date DPDinformation.

Continuing with the discussion of FIG. 5, in Step 508, the node monitorsits immediate neighbors. The monitoring may include periodically sendinga message on each of its communication interfaces and then awaiting aresponse. If the communication interface (as specified in thenode-specific DPD information) is currently connected to an immediateneighbor, then the node may expect a response within a specific periodof time. If a response is received, then the monitoring continues;however, if a response is not received then a neighbor state change isdetected (Step 510). Alternatively, each of the immediate neighbors isconfigured to periodically send a message (e.g., a keep-alive message)on each of its communication interfaces. If a message is received asexpected, then the monitoring continues; however, if a message is notreceived then a neighbor state change is detected (Step 510).

The aforementioned scenarios focus on a node that was previously activebecoming unavailable or inaccessible. However, the monitoring may alsobe used to detect the presence of a new node and/or a node that waspreviously unavailable or inaccessible becoming active. For example, ifa response or a message is received on a communication interface that isnot currently specified in the node-specific DPD information, then theneighbor state change is detected (Step 510); otherwise, the monitoringcontinues.

In Step 510, if a neighbor state change is detected, the processproceeds to step 512 or 514; otherwise, the process proceeds to step508. The process may proceed to step 512 if the neighbor state change istriggered by the detection of a new node and/or a node that waspreviously unavailable or inaccessible becoming active. The process mayproceed to step 514 if neighbor state change is triggered by a node thatwas previously active becoming unavailable or inaccessible.

In Step 512, neighbor information for the new node or the previouslyinactive or unavailable node is obtained using the same or similarprocess as described in step 500.

In Step 514, the node-specific DPD information is updated to: (i) removeneighbor information and/or (ii) add neighbor information obtained instep 512. The process then proceeds to step 506.

FIG. 6 shows a flowchart of a method of storing data in nodes inaccordance with one or more embodiments of the invention. The methodshown in FIG. 6 may be performed on a per-node basis. Further, themethod shown in FIG. 6 may be performed by the node management engine(or another component) in the node.

While FIG. 6 is illustrated as a series of steps, any of the steps maybe omitted, performed in a different order, additional steps may beincluded, and/or any or all of the steps may be performed in a paralleland/or partially overlapping manner without departing from theinvention.

In Step 600, a request to store data is received by a node from a datasource. The data source may be a client, a data processor, and/or anapplication executing on a node. There may be other data sources withoutdeparting from the invention. The data source may or may not haveaggregated DPD information.

In Step 602, a determination is made about whether the DPG is able tostore the data. If the DPG is able to store the data, then the processproceeds to step 604; otherwise, the process proceeds to step 612.

The determination in step 602 may include determining whether: (i) thenode that received the request can itself store the data and/or (ii)whether there are a sufficient number of nodes in the DPG. With respectto (i), this determination covers the scenario in which the node thatreceived the request has itself failed, is unable to store data in itspersistent storage, and/or is unable to facilitate the storage of datain the DPG. With respect to (ii), this determination covers whetherthere are a sufficient number of members in the DPG in order to servicethe request. This determination is made using the node-specific DPDinformation. For example, if the data is to be stored such that thereare ultimately three copies of the data stored in the DPG, where eachcopy of the data is stored on a separate node in the DPG, then thenode-specific DPD information needs to include at least two immediateneighbor nodes. However, if there is only one immediate neighbor nodespecified in the node-specific DPD information, then the DPG may bedeemed unable to store the data.

The determination in (ii) may be performed on a per-request basis basedon information specified in the request about the data protection scheme(e.g., replicas and/or erasure coding) to be used to store the data. Ifthe request does not specify any data protection scheme, then a defaultdata protection scheme (e.g., as specified in the DPD information and/orelsewhere in the node) may be used to determine the minimum number ofimmediate neighbors required to store the data. This information maythen be used to make the determination in (ii).

In Step 604, the data is stored on the node, e.g., in persistentstorage.

In Step 606, the node initiates the storage of copies of the data on oneor more other nodes in the DPG using the node-specific DPD information.For example, the node may select an immediate neighbor node specified inthe node-specific DPD information. The node may then generate a requestto the selected node. The request may then be transmitted to theselected immediate neighbor node via the communication interfacespecified in the DPD information using the address, e.g., an IP address,associated with the selected immediate neighbor node. The above processmay be repeated for each selected node, where the number of selectednodes corresponds to the number of replicas required. For example, ifthere are three total copies required (i.e., the data plus tworeplicas), then the above process is repeated twice—once for eachselected immediate neighbor node.

If there are more immediate neighbor nodes specified in thenode-specific DPD information than are required to service the request(e.g., there are four immediate neighbor nodes but only two immediateneighbor nodes are required), then any known or later discoverymechanism may be used to select a subset of the immediate neighbornodes. For example, the immediate neighbor nodes may be selectedarbitrarily, using a round-robin mechanism, or using the current load oneach of the immediate neighbor nodes.

In Step 608, a determination is made about whether the data storage inthe DPG is successful. If the data storage is successful, then theprocess proceeds to step 610; otherwise, the process proceeds to step612.

The determination in step 608 may include: (i) determining whether thestorage of the data on the node is successful and (ii) whether the datais successfully stored on each of the selected immediate neighbor nodesin the DPG. With respect to (ii), the selected immediate neighbor nodesmay send a success or failure notification to the node via the physicalpaths that connect the node to the selected immediate neighbor nodes.The selected node may send a success notification when the data issuccessfully stored on the node. The selected immediate neighbor nodemay send a failure notification if the selected immediate neighbor nodeis unable to store the data in its persistent storage. In anotherembodiment of the invention, a failure may be determined to haveoccurred when no response is received from an immediate neighbor nodeafter the request is sent. This scenario may occur if, after the requestis sent, the neighbor node subsequently fails or otherwise becomesunavailable or unreachable. Depending on the circumstances that giverise to a failure notification, the failure notification may includeinformation about the cause of the failure.

In Step 610, when the determination in step 608 indicates successfulstorage of the data in the DPG, then a success notification is sent tothe data source (i.e., the entity that sent the request in step 600).

In Step 612, when the determination in step 602 indicates that the DPGis unable to store the data or the determination in step 608 indicatesthat the storage of the data in the DPG is not successful, then afailure notification is sent to the data source. Depending on thecircumstances that give rise to a failure notification, the failurenotification may include information about the cause of the failure. Ifthe node to which the request in step 600 is sent itself fails orotherwise is unavailable or unreachable by the data source, then afailure of the request may be inferred by the data source when noresponse is received from the node by the data source after apre-determined period of time.

FIG. 7 shows a diagram of an example of storing data in nodes inaccordance with one or more embodiments of the invention. The example isnot intended to limit the scope of the invention.

Turning to the example, consider a scenario in which a data processor(not shown) attempts to write data (e.g., File A—denoted as “A”) to thecluster. In this example, the cluster includes five nodes (Node A (700),Node B (702), Node C (704), Node D (706), Node E (708)). Further, thenodes in the cluster are arranged in a single-chain configuration usingcommunication interfaces (710, 712, 714, 716, 718, 720, 722, 724, 726,728).

Initially, the data processor (which does not have aggregated DPDinformation) is able to issue requests to the individual nodes in thecluster, and issues a request to Node C (704) [1]. Node C (704) hasfailed. Accordingly, the data processor does not receive a response fromNode C (704) and determines the request has failed [2]. The dataprocessor then issues a request to Node D (706) [3]. Node D (706)receives the request and using the node-specific DPD informationdetermines that three copies of File A need to be stored in the DPG towhich Node D (706) belongs. Node D (706) includes node-specific DPDinformation, which specifies that Node E (708) is an immediate neighbor.However, no other immediate neighbor nodes are specified in thenode-specific DPD information. Because there are only two nodes in theDPG (i.e., Node D (706) and Node E (708)), the Node D (706) responds tothe data processor and indicates that the DPG is unable to service therequest [4].

The data processor then issues a request to Node A (700) [5]. Node A(700) receives the request and, using the node-specific DPD information,determines that three copies of File A need to be stored in the DPG towhich Node A (700) belongs. Node A (700) includes node-specific DPDinformation, which specifies that Node B (702) and Node E (708) areimmediate neighbors (i.e., the DPG includes Node A (700), Node B (702),and Node E (708)). Node A (700), subsequently stores a File A (“A”) onNode A (700). Node A (700) then issues a request to Node E (708), whichNode E (708) subsequently services resulting in a copy of File A (“A”)being stored on Node E (708) [6]. Node A (700) then issues a request toNode B (702), which Node B (702) subsequently services resulting in acopy of File A (“A”) being stored on Node B (702) [7]. Steps [6] and [7]may be performed concurrently. After all the three copies of File A havebeen stored in the cluster, Node A (700) issues a success notificationto the data processor.

FIG. 8 shows a flowchart of a method of storing data in nodes inaccordance with one or more embodiments of the invention. Further, themethod shown in FIG. 8 may be performed by the node management engine(or another component) in the node.

While FIG. 8 is illustrated as a series of steps, any of the steps maybe omitted, performed in a different order, additional steps may beincluded, and/or any or all of the steps may be performed in a paralleland/or partially overlapping manner without departing from theinvention.

In Step 800, a request to store data is received by a node from a datasource. The data source may be a client, a data processor, and/or anapplication executing on a node. There may be other data sources withoutdeparting from the invention. In this embodiment, the data sourceincludes aggregated DPD information and uses this information in orderto determine to which nodes to issue requests.

In Step 802, a determination is made about whether the DPG is able tostore the data. If the DPG is able to store the data, then the processproceeds to step 804; otherwise, the process proceeds to step 812.

The determination in step 802 may include determining whether: (i) thenode that received the request can itself store the data (or datachunks) and/or (ii) whether there are a sufficient number of nodes inthe DPG. With respect to (i), this determination covers the scenario inwhich the node that received the request has itself failed, is unable tostore data (or data chunks) in its persistent storage, and/or is unableto facilitate the storage of data (or data chunks) in the DPG. Withrespect to (ii), this determination covers whether there are asufficient number of members in the DPG in order to service the request.This determination is made using the node-specific DPD information. Forexample, if the data chunks (i.e., portions of the data) are to bestored such that the data chunks are evenly (or substantially evenly)distributed across three nodes, then the node-specific DPD informationneeds to include at least two immediate neighbor nodes. However, ifthere is only one immediate neighbor node specified in the node-specificDPD information, then the DPG may be deemed unable to store the data ordata chunks.

The determination in (ii) may be done on a per-request basis based oninformation specified in the request about the data protection scheme(e.g., replication) to be used to store the data. If the request doesnot specify any data protection scheme, then a default data protectionscheme (e.g., as specified in the DPD information and/or elsewhere inthe node) may be used to determine the minimum number of immediateneighbors required to store the data. This information may then be usedto make the determination in (ii).

In Step 804, if the DPG can store the data, then the node divides thedata in chunks also referred to as data chunks. The data chunks may bethe same size or substantially similar in size. Alternatively, the datachunks have different sizes without departing from the invention.

In Step 806, the node initiates the storage of data chunks across thenodes in the DPG using the node-specific DPD information. For example,the node may select an immediate neighbor node specified in thenode-specific DPD information. The node may then generate a request tothe selected node. The request may specify a portion of the data chunksand may be transmitted to the selected immediate neighbor node via thecommunication interface specified in the DPD information using theaddress, e.g., an IP address, associated with the selected immediateneighbor node. The above process may be repeated for each selected node,where the number of selected nodes corresponds to the number of replicasrequired. For example, if there are three nodes in the DPG, then theabove process is repeated twice—once for each selected immediateneighbor node. For the data chunks that are not written to the othermembers in the DPG, the node initiates the storage of such data chunksin the persistent storage.

Once all requests have been sent, each of the data chunks is stored onone of the nodes (or members) that is part of the DPG. The specificnumber of data chunks stored on each of the nodes in the DPG may be thesame or substantially similar. In other embodiments of the invention,the data chunks may not be divided equally across the nodes in the DPG.Further, the specific data chunks stored on each of the nodes may bedetermined using a round-robin scheme, may be selected arbitrarily orrandomly, or may be selected using any other scheme without departingfrom the invention.

If there are more immediate neighbor nodes specified in thenode-specific DPD information than are required to service the request(e.g., there are four immediate neighbor nodes but only two immediateneighbor nodes are required), then any known or later discoverymechanism may be used to select the immediate neighbor nodes. Forexample, the immediate neighbor nodes may be selected arbitrarily, usinga round-robin mechanism, or using the current load on each of theimmediate neighbor nodes.

In Step 808, a determination is made about whether the data storage inthe DPG was successful. If the data storage was successful, then theprocess proceeds to step 810; otherwise, the process proceeds to step812.

The determination in step 808 may include: (i) determining whether thestorage of the portion of the data chunks on the node is successful and(ii) whether the other portions of the data chunks are successfullystored on each of the selected immediate neighbor nodes in the DPG. Withrespect to (ii), the selected immediate neighbor nodes may send asuccess or failure notification to the node via the physical paths thatconnect the node to the selected immediate neighbor nodes. The selectedimmediate neighbor nodes may send a success notification when the datachunks are successfully stored on the selected immediate neighbor node.The selected immediate neighbor node may send a failure notification ifthe selected immediate neighbor node is unable to store the data chunksin its persistent storage. In another embodiment of the invention, afailure may be determined to have occurred when no response is receivedfrom a selected immediate neighbor node after the request is sent. Thisscenario may occur if, after the request is sent, the selected immediateneighbor node subsequently fails or otherwise becomes unavailable orunreachable. Depending on the circumstances that give rise to a failurenotification, the failure notification may include information about thecause of the failure.

In Step 810, when the determination in step 808 indicates successfulstorage of the data chunks in the DPG, then a success notification issent to the data source.

In Step 812, when the determination in step 802 indicates that the DPGis unable to store the data chunks or the determination in step 808indicates that the storage of the data in the DPG was not successful,then a failure notification is sent to the data source. Depending on thecircumstances that give rise to a failure notification, the failurenotification may include information about the cause of the failure. Ifthe node to which the request in step 800 is sent itself fails orotherwise is unavailable or unreachable by the data source, then afailure of the request may be inferred by the data source when noresponse is received from the node after a pre-determined period oftime.

FIG. 9 shows a diagram of an example of storing data in nodes inaccordance with one or more embodiments of the invention. The example isnot intended to limit the scope of the invention.

Turning to the example, consider a scenario in which a data processor(not shown) implements a scale-out file system (SoFS) where the SoFSincludes the aggregated DPD information. The SoFS uses the aggregatedDPD information to determine that the nodes in the cluster (Node A(900), Node B (902), Node C (904), Node D (906), Node E (908)) areconfigured in a single-chain configuration using communicationinterfaces (910, 912, 914, 916, 918, 920, 922, 924, 926, 928). Based onthis understanding of the arrangement of nodes in the cluster, the SoFSmay select nodes to which to issue requests. In this example, the SoFSwants to store three copies of a DATA in the cluster. However, the SoFSalso wants to ensure that the three copies of the DATA are distributedacross the nodes in the cluster in a manner that minimizes the risk oflosing the DATA if one or more of the nodes fails or is otherwiseunavailable. Using the aggregated DPD information, the SoFS issues afirst request to Node A (900) to store DATA [1], a second request toNode C (904) to store a copy of the DATA (R1) [3], and a third requestto store a second copy of DATA (R2) to Node E (908) [5].

Each of the aforementioned nodes independently performs that methoddescribed in FIG. 8. The processing described below may occurconcurrently without departing from the invention.

For example, Node A (900) divides the DATA into four data chunks [A, B,C, D] and uses a round-robin scheme (in combination with thenode-specific DPD information) to store chunks A and D on Node A (900)and determine that chunk B is to be stored on Node B (902) and thatchunk C is to be stored on Node E (908). Chunk B is transmitted via CI(912) to Node B (902) and chunk C is transmitted via CI (910) to Node E(908). Node B (902), after storing chunk B, transmits a successnotification to Node A (900) via CI (914), which is received by CI (912)on Node A (900). Node E (908), after storing chunk C, transmits asuccess notification to Node A (900) via CI (928), which is received byCI (910) on Node A (900). Node A (900) after receiving the successnotifications from Node B (902) and Node E (908) and after successfullystoring chunks A and D in its persistent storage, sends a successnotification to the SoFS [2].

Further, Node C (904) divides the R1 into four data chunks [A′, B′, C′,D′] and uses a round-robin scheme (in combination with the node-specificDPD information) to store chunks A′ and D′ on Node C (904) and determinethat chunk B′ is to be stored on Node D (906) and that chunk C′ is to bestored on Node B (902). Chunk B′ is transmitted via CI (920) to Node D(906) and chunk C′ is transmitted via CI (918) to Node B (902). Node B(902), after storing chunk C′, transmits a success notification to NodeC (904) via CI (916), which is received by CI (918) on Node C (904).Node D (906), after storing chunk B′, transmits a success notificationto Node C (904) via CI (922), which is received by CI (920) on Node C(904). Node C (904) after receiving the success notifications from NodeB (902) and Node D (906) and after successfully storing chunks A′ and D′in its persistent storage, sends a success notification to the SoFS [4].

Finally, Node E (908) divides the R2 into four data chunks [A″, B″, C″,D″] and uses a round-robin scheme (in combination with the node-specificDPD information) to store chunks A″ and D″ on Node E (908) and determinethat chunk B″ is to be stored on Node A (900) and that chunk C″ is to bestored on Node D (906). Chunk B″ is transmitted via CI (928) to Node A(900) and chunk C″ is transmitted via CI (926) to Node D (906). Node A(900), after storing chunk B″, transmits a success notification to NodeE (908) via CI (910), which is received by CI (928) on Node E (908).Node D (906), after storing chunk C″, transmits a success notificationto Node E (908) via CI (924), which is received by CI (926) on Node E(908). Node E (908) after receiving the success notifications from NodeA (900) and Node D (906) and after successfully storing chunks A″ and D″in its persistent storage, sends a success notification to the SoFS [6].

FIGS. 10.1-10.2 shows a flowchart of a method of storing data in nodesin accordance with one or more embodiments of the invention. Further,the method shown in FIGS. 10.1-10.2 may be performed by the nodemanagement engine (or another component) in the node.

The method shown in FIGS. 10.1-10.2 may enable the nodes in the clusterto receive a single request from a data source and then, independentlyof the data source, store data chunks in the same manner as describedwith respect to FIG. 8. Said another way, the method shown in FIG. 8 isan embodiment in which the storage of data and corresponding replicas iscoordinated by a data source (or an external entity) such as a SoFS. Incontrast, FIGS. 10.1-10.2 are directed to an embodiment in which thenodes (without the SoFS), using the node-specific DPD information (whichincludes replica and chunk paths), are able to coordinate the storage ofdata that has the same ultimate result of data storage that is achievedwhen using the SoFS.

Each node in the cluster may perform the methods shown in FIGS.10.1-10.2. The specific portions of the methods performed by a givennode depends on whether the node receives the request to store data froma data source, whether the node receives data on a chunk path, whetherthe node receives data on a replica path and the node is the replicatarget, or whether the node receives data on the replica path and is notthe replica target.

While FIGS. 10.1-10.2 are illustrated as a series of steps, any of thesteps may be omitted, performed in a different order, additional stepsmay be included, and/or any or all of the steps may be performed in aparallel and/or partially overlapping manner without departing from theinvention.

In Step 1000, a request is received by a node from a data source. Thedata source may be a node, a client, a data processor, and/or anapplication executing on a node. There may be other data sources withoutdeparting from the invention. The data source may or may not haveaggregated DPD information.

In Step 1002, a determination is made about whether the request isreceived on a chunk path. If the request is received on a chunk path,the process proceeds to step 1004; otherwise the process proceeds tostep 1006.

The determination in step 1002 may be made using information in therequest and/or information about the communication interface on whichthe request was received. In a single-chain configuration, the replicapath and the chunk path are logical paths that share the same physicalpath. In this scenario, the request may include information whichspecifies whether the request is being transmitted via the chunk path orreplica path. In a dual-chain configuration, the replica path and thechunk path are separate physical paths. In this scenario, the requestmay not include any information that specifies whether the request wastransmitted via chunk path or replica path; rather, the node, using thenode-specific DPD information, may determine whether the request wastransmitted via the replica path or the chunk path based on thecommunication interface on which the request was received.

In Step 1004, because the request was received on the chunk path, therequest is a request to store a data chunk and, as such, the nodeinitiates storage of the data chunk (which was transmitted via therequest) to its persistent storage. The process then proceeds to step1022.

In Step 1006, because the request was not received on the chunk path, adetermination is made about whether the request was received on areplica path. If the request was received on a replica path, the processproceeds to step 1008; otherwise the process proceeds to step 1012.

The determination in step 1006 may be made using information in therequest and/or information about the communication interface on whichthe request was received. In a single-chain configuration, the replicapath and the chunk path are logical paths that share the same physicalpath. In this scenario, the request may include information whichspecifies whether the request is being transmitted via the chunk path orreplica path. In a dual-chain configuration, the replica path and thechunk path are separate physical paths. In this scenario, the requestmay not include any information that specifies whether the request wastransmitted via chunk path or replica path; rather, the node, using thenode-specific DPD information, may determine whether the request wastransmitted via the replica path or the chunk path based on thecommunication interface on which the request was received.

In Step 1008, if the request was received on the replica path, then adetermination is made about whether the node is the replica target. Thenode is the replica target if the node is to perform the step 1018 and1020. Said another way, the node is a replica target if it manages thestorage of a given replica across members in its DPG. In order to makethis determination, the request may specify the name of the replicatarget and the node may compare the name in the request to its name(which may or may not be specified in the node-specific DPD informationon the node). If the node is the replica target the process proceeds tostep 1012; otherwise, the process proceeds to step 1010.

In Step 1010, when the node is not the replica target, the request isforwarded (using the node-specific DPD information, which includes thereplica paths for the cluster) towards the replica target.

When the node is the replica target (step 1008) or the node did notreceive the request via a replica path or a chunk path (i.e., the nodereceived the request from, e.g., a client, a data processor, a SoFS,and/or an application), then in step 1012 a determination is made aboutwhether the DPG is able to store the data. If the DPG is able to storethe data, then the process proceeds to step 1014 or 1018; otherwise, theprocess proceeds to step 1026.

The determination in step 1012 may include determining whether: (i) thenode that received the request can itself store the data (or datachunks) and/or (ii) whether there are a sufficient number of nodes inthe DPG. With respect to (i), this determination covers the scenario inwhich the node that received the request is unable to store data (ordata chunks) in its persistent storage, and/or is unable to facilitatethe storage of data (or data chunks) in the DPG. With respect to (ii),this determination covers whether there are a sufficient number ofmembers in the DPG in order to service the request. This determinationis made using the node-specific DPD information. For example, if thedata chunks (i.e., portions of the data) are to be stored such that thedata chunks are evenly (or substantially evenly) distributed acrossthree nodes, then the node-specific DPD information needs to include atleast two immediate neighbor nodes. However, if there is only oneimmediate neighbor node specified in the node-specific DPD information,then the DPG may be deemed unable to store the data or data chunks.

The determination in (ii) may be done on a per-request basis based oninformation specified in the request about the data protection scheme(e.g., number of replicas) to be used to store the data. If the requestdoes not specify any data protection scheme, then a default dataprotection scheme (e.g., as specified in the DPD information and/orelsewhere in the node) may be used to determine the minimum number ofimmediate neighbors required to store the data. This information maythen be used to make the determination in (ii).

In Step 1014, when the request is not received via a replica path orchunk path, then the node that received the request is step 1000 managesthe overall servicing the request. The servicing of the request includesidentifying the number of replicas required (which may be specified inthe request and/or be determined by the node using, e.g., node-specificDPD information) and identifying specific nodes in the cluster that willmanage the storage of the individual replicas. The identity of the nodesthat will manage the storage of the replicas may be determined using thereplica paths specified in the node-specific DPD information, whichspecifies the nodes which may be selected to manage the storage of thereplicas.

In Step 1016, the node sends a request to each replica node (i.e., nodesidentified in step 1014 to manage the storage of the replicas) to storea replica. The request is sent via the replica path(s) specified in thenode-specific DPD information. When the replica nodes receive therequests, the replica nodes may process the requests using the methoddescribed in FIGS. 10.1-10.2.

The process may arrive at step 1018 via step 1012 or step 1016. Theprocess arrives at step 1018 via step 1012 when the request received instep 1000 is via a replica path and the node is the replica target. Theprocess arrives at step 1018 via step 1016 when the request in step 1000is not received via a replica path or chunk path.

In Step 1018, the node (which may or may not be a replica node) dividesthe data in chunks also referred to as data chunks. The data chunks maybe the same size or substantially similar in size. Alternatively, thedata chunks have different sizes without departing from the invention.

In Step 1020, the node initiates the storage of data chunks across thenodes in the DPG using the node-specific DPD information. For example,the node may select an immediate neighbor node specified in thenode-specific DPD information. The node may then generate a request tothe selected node. The request may specify a portion of the data chunksand may be transmitted to the selected immediate neighbor node via thecommunication interface specified in the DPD information using theaddress, e.g., an IP address, associated with the selected immediateneighbor node. The above process may be repeated for each selected node,where the number of selected nodes corresponds to the number of replicarequired. For example, if there are three nodes in the DPG, then theabove process is repeated twice—once for each selected immediateneighbor node. For the data chunks that are not written to the othermembers in the DPG, the node initiates the storage of such data chunksin the persistent storage.

Once all requests have been sent, each of the data chunks is stored onone of the nodes (or members) that is part of the DPG. The specificnumber of data chunks stored on each of the nodes in the DPG may be thesame or substantially similar. In other embodiments of the invention,the data chunks may not be divided equally across the nodes in the DPG.Further, the specific data chunks stored on each of the nodes may bedetermined using a round-robin scheme, may be selected arbitrarily orrandomly, or may be selected using any other scheme without departingfrom the invention.

If there are more immediate neighbor nodes specified in thenode-specific DPD information than is required to service the request(e.g., there are four immediate neighbor nodes but only two immediateneighbor nodes are required), then any known or later discoverymechanism may be used to select the immediate neighbor nodes. Forexample, the immediate neighbor nodes may be selected arbitrarily, usinga round-robin mechanism, or using the current load on each of theimmediate neighbor nodes.

In Step 1022, determination is made about whether the data storage wassuccessful. If the data storage was successful, then the processproceeds to step 1026; otherwise, the process proceeds to step 1024.

When the node is storing a data chunk then the determination in step1024 may include determining whether the data chunks are successfullystored in the node's persistent storage. The node may send a success orfailure notification to the replica target via the physical paths thatconnect the node to the replica target (or node that received theoriginal request in step 1000). The node may send a success notificationwhen the data chunks are successful stored on the node. The node maysend a failure notification if the node is unable to store the datachunks in its persistent storage. In another embodiment of theinvention, a failure may be determined to have occurred when no responseis received from the node after the request is sent. This scenario mayoccur if, after the request is sent, the node subsequently fails orotherwise become unavailable or unreachable. Depending on thecircumstances that give rise to a failure notification, the failurenotification may include information about the cause of the failure.

When the node is a replica target, then the determination in step 1024may include: (i) determining whether the storage of the portion of thedata chunks on the node was successful and (ii) whether the otherportions of the data chunks were successfully stored on each of theselected immediate neighbor nodes in the DPG. With respect to (ii), theselected immediate neighbor nodes may send a success or failurenotification to the node via the physical paths that connect the node tothe selected immediate neighbor nodes. The selected immediate neighbornode may send a success notification when the data chunks aresuccessfully stored on the node. The selected immediate neighbor nodemay send a failure notification if the selected immediate neighbor nodeis unable to store the data chunks in its persistent storage. In anotherembodiment of the invention, a failure may be determined to haveoccurred when no response is received from a selected immediate neighbornode after the request is sent. This scenario may occur if, after therequest is sent, the neighbor node subsequently fails or otherwisebecome unavailable or unreachable. Depending on the circumstances thatgive rise to a failure notification, the failure notification mayinclude information about the cause of the failure.

When the node is the node that received the original request to storedata from a client, a data processor, and/or an application executing ona node, then the determination may include two sets of determinations:(i) determining that each replica target successfully stored in the dataand (ii) determining that the node itself successfully stored in thedata across its DPG (i.e., a similar determination that is made by eachof the replica targets as described above). If either of the twodeterminations fails (i.e., data was not successfully stored), then afailure notification may be issued to the source (e.g., a client, a dataprocessor, and/or an application executing on a node) of the request.

In Step 1024, when the determination in step 1022 indicates successfulstorage of the data chunks on the node, across the DPG or across thecluster, then a success notification is sent to the replica target, thenode that initiated the overall storage process, or the source (e.g., aclient, a data processor, and/or an application executing on a node) ofthe request, as appropriate.

In Step 1026, when the determination in step 1022 indicates a failure tostore any of the data chunks on the node, across the DPG or across thecluster, then a failure notification is sent to the replica target, thenode that initiated the overall storage process, or the source (e.g., aclient, a data processor, and/or an application executing on a node) ofthe request, as appropriate

Depending on the circumstances that give rise to a failure notification,the failure notification may include information about the cause of thefailure. If the node that received the request that initiated theoverall storage process itself failed or otherwise is unavailable orunreachable by the data source, then a failure of the request may beinferred by the data source when no response is received from the nodeafter a pre-determined period of time.

While FIGS. 10.1-10.2 describe different nodes performing the chunkingof the data or the replicas, in another embodiment of the invention, thenode that receives the initial request to store the data (e.g., FIG. 11,Node C (1104)) performs the chunking of the data and then distributes(via the replica path) the full set of chunks (i.e., the chunks thatrepresent the data to be stored) to the replica targets. In thisscenario, the replica targets then distribute the received data chunksas described above. This embodiment results in the only node thatreceived the original request incurring the overhead associated with thechunking.

FIG. 11 shows a diagram of an example of storing data in nodes inaccordance with one or more embodiments of the invention. The example isnot intended to limit the scope of the invention.

Turning to the example, consider a scenario in which there are fivenodes (Node A (1100), Node B (1102), Node C (1104), Node C (1106), andNode E (1108). The nodes are connected in a dual-chain configurationusing communication interfaces (1112, 1114, 1116, 1118, 1120, 1122,1124, 1126, 1128, 1130, 1132, 1134, 1136, 1138, 1140, 1142, 1144, 1146,1148, and 1150); however, for the sake of clarity in FIG. 11 some of thephysical connections between the various nodes are omitted. Continuingwith the example, each of the nodes includes functionality to performthe method shown in FIGS. 10.1-10.2.

Consider a scenario in which a client (not shown) sends a request toNode C (1104) to store data and the request specifies that a total ofthree copies of the data need to be stored in the cluster [1]. Thenode-specific DPD information in Node C (1104) specifies the following:(i) replica path (RP) [Node A, Node C, Node E) and (ii) chunk paths (CP)[Node B] and [Node D]. Node C (1104) uses the replica path to determinethat a replica needs to be sent to each of Nodes A (1100) and E (1108).Node C (1104) issues a request via the replica path to Node A (1100) [2]and issues a request via a second portion of the replica path to Node E(1108) [3]. In addition, Node C (1104) also chunks the DATA it receivedinto data chunks and store a portion of the data chunks in itspersistent storage [4]. A first portion of the remaining data chunks aretransmitted to Node B (1102) via a chunk path [5] and a second portionof the remaining data chunks are transmitted to Node D (1106) via asecond chunk path [6]. Though not shown in FIG. 11, Nodes B (1102) and D(1106) successfully store their respective portions of the data chunksand send back corresponding success notifications to Node C (1104)(e.g., via the chunk paths).

Node A (1100) receives the request from Node C (1104) via the replicapath. Node A (1100) chunks the REPLICA 1 (which is a copy of DATA) itreceived into data chunks and store a portion of the data chunks in itspersistent storage [7]. A first portion of the remaining data chunks aretransmitted to Node B (1102) via a chunk path [8] and a second portionof the remaining data chunks are transmitted to Node E (1108) via asecond chunk path [9]. Though not shown in FIG. 11, Nodes B (1102) and E(1108) successfully store their respective portions of the data chunksand send back corresponding success notifications to Node A (1100)(e.g., via the chunk paths). Upon receiving success notifications fromNodes B (1102) and E (1108), Node A sends a success notification to NodeC (1104) indicating that REPLICA 1 was successfully stored.

Node E (1108) receives the request from Node C (1104) via the replicapath. Node E (1108) chunks the REPLICA 2 (which is a copy of DATA) itreceived into data chunks and store a portion of the data chunks in itspersistent storage [10]. A first portion of the remaining data chunksare transmitted to Node D (1106) via a chunk path [11] and a secondportion of the remaining data chunks are transmitted to Node A (1100)via a second chunk path [12]. Though not shown in FIG. 11, Nodes A(1100) and D (1106) successfully store their respective portions of thedata chunks and send back corresponding success notifications to Node E(1108) (e.g., via the chunk paths). Upon receiving success notificationsfrom Nodes A (1100) and D (1106), Node E (1108) sends a successnotification to Node C (1104) indicating that REPLICA 2 was successfullystored.

Finally, Node C (1104) upon receiving the success notifications fromNodes A (1100) and E (1108) and also after determining that DATA (whichis chunked) has been successfully stored in Nodes B (1102), C (1104),and D (1106), sends a success notification to the client indicating thatthe DATA and two replicas were successfully stored in the cluster.

FIG. 12 shows a flowchart of a method of storing data in nodes inaccordance with one or more embodiments of the invention. Further, themethod shown in FIG. 12 may be performed by the node management engine(or another component) in the node.

While FIG. 12 is illustrated as a series of steps, any of the steps maybe omitted, performed in a different order, additional steps may beincluded, and/or any or all of the steps may be performed in a paralleland/or partially overlapping manner without departing from theinvention.

In Step 1200, the data source may be a client, a data processor, and/oran application executing on a node. There may be other data sourceswithout departing from the invention. The data source may or may nothave aggregated DPD information.

In Step 1202, a determination is made about whether the DPG is able tostore the data. If the DPG is able to store the data, then the processproceeds to step 1204; otherwise, the process proceeds to step 1212.

The determination in step 1202 may include determining whether: (i) thenode that received the request can itself store the data and/or (ii)whether there are a sufficient number of nodes in the cluster. Withrespect to (i), this determination covers the scenario in which the nodethat received the request has itself failed, is unable to store data inits persistent storage, and/or is unable to facilitate the storage ofdata in the cluster. With respect to (ii), this determination coverswhether there are a sufficient number of members in the cluster toservice the request. This determination is made using the node-specificDPD information for one or more nodes (depending on the erasure codingscheme and the daisy chain configuration).

For example, if the data is to be stored using a particular erasurecoding scheme (which may or may not be specified in the request), thenthe node-specific DPD information is used to determine whether there area sufficient number of nodes to store the data (which is divided intodata chunks) and parity value(s) (which may be stored in one or moreparity chunks) in a manner that satisfies the erasure coding scheme.

For example, if the data is to be stored using a 3:1 erasure codingscheme. Then the cluster needs to include at least four nodes—threenodes to store the data chunks and one node to store the parity chunk.If the nodes are arranged in a single-chain configuration then thenode-specific DPD information for at least two nodes is required to makethis determination as the DPG for any given node in the cluster onlyincludes three nodes. However, if the nodes are arranged in a dual-chainconfiguration then only node-specific DPD information from a single nodein the cluster may be required as the DPG for each node in the clusterincludes five nodes.

The determination in (ii) may be done on a per-request basis based oninformation specified in the request about the erasure coding scheme tobe used to store the data. If the request does not specify any erasurecoding scheme, then a default erasure coding scheme (e.g., as specifiedin the DPD information and/or elsewhere in the node) may be used todetermine the minimum number of nodes required to store the data. Inanother embodiment of the invention, the default erasure coding schememay be used even in scenarios in which the request specifies an erasurecoding scheme. Specifically, if the cluster is unable to support therequested erasure encoding scheme, then the cluster may still store thedata using a supported erasure coding scheme (i.e., an erasure encodingscheme for which the cluster includes a sufficient number of nodes).

Once the erasure coding scheme is determined, the number of nodesrequired to store the data may be determined and then this informationmay be used to make the determination in (ii).

In Step 1204, the data is divided into data chunks (which are the samesize or substantially similar in size) and the corresponding parityvalue(s) is generated based on the selected erasure coding scheme (i.e.,the erasure coding scheme that was used to make the determination inStep 1202). The generated parity value(s) is then stored in a paritychunk. If multiple parity values are generated, then one parity value isstored in each parity chunk.

In Step 1206, storage of the data chunks and parity chunks is initiatedusing the node-specific DPD information from one or more nodes (asdiscussed above). In a single-chain configuration, the data chunks aredistributed across the node (i.e., the node that received the request instep 1200) and its two immediate neighbors. The parity chunks are thenstored two hops away from the node (i.e., the node that received therequest in step 1200). If there are multiple parity values, then theyare stored across the nodes that are two hops away from the node (i.e.,the node that received the request in step 1200).

In a dual-chain configuration, the data chunks and the parity chunks aredistributed across the node (i.e., the node that received the request instep 1200) and the four immediate neighbor nodes.

Regardless of the daisy chain configuration, the data chunks and paritychunks for any given slice are each stored in separate nodes. Forexample, if File 1 is to be stored using a 3:1 erasure coding scheme,then File 1 may be divided into data chunks [A, B, C] and a parity valueP1 may be generated using data chunks [A, B, C]. The resulting slicewill include [A, B, C, P1], where each of the A, B, C, and P1 is storedon different nodes (as described above) based on the daisy chainconfiguration of the nodes.

Once the placement of the data chunks and parity chunk(s) is determinedby the node (i.e., the node that received the request in step 1200), thenode issues requests to store data chunks and parity chunks to thevarious nodes in the cluster. In addition, the node (i.e., the node thatreceived the request in step 1200) stores a data chunk and/or a paritychunk in its persistent storage.

In Step 1208, a determination is made about whether the data storage inthe DPG was successful. If the data storage was successful, then theprocess proceeds to step 1210; otherwise, the process proceeds to step1212.

The determination in step 1208 may include: (i) determining whether thestorage of the data chunk or parity chunk on the node was successful and(ii) whether the data chunk or parity chunk was successfully stored oneach of the selected nodes in the cluster. With respect to (ii), theselected nodes may send a success or failure notification to the nodevia the physical paths that connect (directly or indirectly) the node tothe selected nodes. The node may send a success notification when thedata chunk or parity chunk is successfully stored on the node. The nodemay send a failure notification if the selected node is unable to storethe data chunk or parity chunk in its persistent storage. In anotherembodiment of the invention, a failure may be determined to haveoccurred when no response is received from a node after the request issent. This scenario may occur if, after the request is sent, the nodesubsequently fails or otherwise become unavailable or unreachable.Depending on the circumstances that give rise to a failure notification,the failure notification may include information about the cause of thefailure.

In Step 1210, when the determination in step 1208 indicates successfulstorage of the data in the cluster, then a success notification is sentto the data source.

In Step 1212, when the determination in step 1202 indicates that thecluster is unable to store the data or the determination in step 1208indicates that the storage of the data in the cluster was notsuccessful, then a failure notification is sent to the data source.Depending on the circumstances that give rise to a failure notification,the failure notification may include information about the cause of thefailure. If the node to which the request in step 1200 itself failed orotherwise is unavailable or unreachable by the data source, then afailure of the request may be inferred by the data source when noresponse is received from the node after a pre-determined period oftime.

FIG. 13 shows a flowchart of a method of rebuilding data in nodes inaccordance with one or more embodiments of the invention. Further, themethod shown in FIG. 13 may be performed by the node management engine(or another component) in the node.

While FIG. 13 is illustrated as a series of steps, any of the steps maybe omitted, performed in a different order, additional steps may beincluded, and/or any or all of the steps may be performed in a paralleland/or partially overlapping manner without departing from theinvention.

In Step 1300, the node may detect that another node in the cluster hasfailed. The node may detect the failure of an immediate neighbor inresponse to monitoring its immediate neighbors and detecting a neighborstate change (see e.g., FIG. 5). Alternatively, or additionally, thenode may detect a failure of non-immediate neighbor nodes by receivingnode-specific DPD information for other nodes in the cluster.Alternatively, or additionally, the node may detect the failure of anode (which may or may not be an immediate neighbor) based oninformation received from a client, data processor, or any otherexternal entity.

In Step 1302, in response to detecting the failure in step 1300, thenode determines what data chunks have been lost. The node may make thisdetermination using information about slices stored in the cluster. Forexample, each node may include information about all of the slicesstored in the cluster, where the information includes the data chunksand parity chunks associated with each slice and the location of each ofthe aforementioned data chunks and parity chunks in the cluster.Alternatively, or additionally, the node may request information from anexternal entity (e.g., a client, a data processor, etc.) about what datachunks were stored on the failed node as well as information about theslices of which the lost data chunks were members. Alternatively, oradditionally, the node may request information about the lost datachunks and/information about the slices stored in the cluster from othernodes in the cluster.

Regardless of how information about the slices is obtained, the resultof step 1302 is: (i) identification of the data chunks that are lost and(ii) identification of the location of the data chunks and parity chunksthat may be used to rebuild the lost data chunks.

In Step 1304, a node (which may or may not be the node that detected thefailure) in the cluster is selected to perform the rebuilding of thelost data chunks. The selection of the node is based on node-specificDPD information and/or aggregated DPD information (which may be storedon one or more nodes in the cluster). The use of the aforementioned DPDinformation enables selection of the node that minimizes: (i) the numberof data chunks and/or parity chunks that need to be transmitted for therebuilding process and/or (ii) minimizes the distance (in this contextthe number of hops) over which the data chunks and/or parity chunks haveto be transmitted. For example, a node that is one hop to (i.e., is animmediate neighbor of) most of the other nodes that include the datachunks and parity chunks required for rebuilding the lost data chunksmay be selected over a node for which most of the required data chunksand/or parity chunks are two-hops from the node.

At the end of step 1304, the selected node is notified that it is toinitiate the rebuilding of the lost data chunks. The selected node, aspart of the notification, may also receive with information required toenable it to rebuild the lost data chunks such as information about thedata chunks and parity chunks required to perform the rebuilding of thelost data chunks as well as the location of aforementioned requiredchunks.

In Step 1306, the selected node obtains the required data and paritychunks from the respective nodes in the cluster. The selected node mayobtain such information by sending requests to each of the nodes thatincludes a required data chunk or parity chunk. The selected node, uponreceiving the data chunks and parity chunks, rebuilds the lost datachunks using any known or later discovered rebuilding mechanism thatuses parity data.

In Step 1308, the selected node determines the placement of the rebuiltdata chunks and the placement of the parity chunks. The placement may bemade using the erasure coding scheme as well as the DPD information(which may be node-specific DPD information or aggregated DPDinformation). The placement may be performed in manner that is the sameor substantially similar to the placement described in Step 1206. Theplacement performed in step 1308 may also take into account the currentlocations of the data chunks and parity chunks such that the ultimateplacement determined in step 1308 minimizes: (i) re-location of datachunks and parity chunks and (ii) the re-location of data chunks orparity chunks between nodes that are not immediate neighbors.

In Step 1310, the selected node initiates the storage of the rebuiltdata chunks and, if necessary, the re-location of one or more paritychunks.

While FIG. 13 focuses on rebuilding lost data chunks, the method in FIG.13 may also be used to rebuild lost parity chunks.

While steps 1300-1304 are described as being performed by a node, thesesteps may be performed by an external entity, e.g., a SoFS, a dataprocessor, a client. In such scenarios, after steps 1300-1304 areperformed, the selected node is then provided with the informationnecessary to rebuild the lost data chunks and then store the data chunksand, if required, re-locate the parity chunks in the cluster.

FIGS. 14.1-14.3 show diagrams of an example of storing data andrebuilding data in nodes in accordance with one or more embodiments ofthe invention. The example is not intended to limit the scope of theinvention.

Consider a scenario in which there are six nodes (Node A (1400), Node B(1402), Node C (1404), Node C (1406), Node E (1408), Node F (1410))arranged in a single-chain configuration connected by communicationinterfaces (1412, 1414, 1416, 1418, 1420, 1422, 1424, 1426, 1428, 1430,1432, 1434). In this example, a request to store DATA is received byNode B (1402) [1]. Node B (1402), in response to receiving the request,determines, using the node-specific DPD information, that the DATA is tobe stored in a 3:1 erasure coding scheme.

Node B (1402) subsequently divides the DATA into the following chunks[A, B, C, D, E, F] and calculates two parity values P1 and P2. P1 iscalculated using [A, B, C] and P2 is calculated using [D, E, F] [2].Node B (1404), using aggregated DPD information (i.e., node-specific DPDinformation from a number of different nodes) determines the location ofeach of the aforementioned data and parity chunks (i.e., the paritychunks that store P1 and P2).

In this example, the data chunks are distributed across Node B (1402)and its immediate neighbor nodes (i.e., Node A (1400) and Node C (1404))with the constraint (based on the erasure coding scheme) that no twochunks of a slice can be stored on the node. For example, for slice [A,B, C, P1], each of the aforementioned chunks must be stored on adifferent node. Further, while the data chunks are stored on immediateneighbors, the parity chunks can be stored on nodes that are directlyconnected to the immediate neighbors. This enables DATA to be moreeasily read from the cluster as all the data chunks for a given sliceare stored on a node or its immediate neighbors.

Once Node B determines the placement of each data chunk and paritychunk, Node B issues the corresponding request via the communicationinterfaces to the other nodes in the cluster. This results in Node A(1400) storing [B, E], Node B (1402) storing [A, D], Node C (1404)storing [C, F], Node D (1406) storing [P1], and Node F (1410) storing[P2] [3].

Referring to FIGS. 14.2 and 14.3, after the aforementioned data chunksand parity chunks are stored, Node C (1404) fails. In response to thefailure, Node A is identified as the node that will rebuild data chunksC and F. The selection of Node A may be performed in accordance withFIG. 13. Node A (1400) subsequently requests data chunks [A, D] fromNode B (1402), parity chunk [P1] from Node D (1406), and parity chunk[P2] from Node F (1410). All of the requests may be made by theappropriate communication interfaces, which may be determined using thenode-specific DPD information from one or more nodes. Node Asubsequently rebuilds data chunk [C_(r)] and data chunk [F_(r)] and thendetermines where to place the rebuilt data chunks and whether tore-locate the parity chunks. The placement of the data chunks is firstconsidered in order to have data chunk [C_(r)] and data chunk [F_(r)] onan immediate neighbor node of Node A (1400) without violating the rulethat a give node cannot have more than one chunk from a given slice.Accordingly, in this example, Node A (1400) determines that data chunk[C_(r)] and data chunk [F_(r)] should be place on Node F (1410) andsends data chunk [C_(r)] and data chunk [F_(r)] to Node F (1410) [5].

However, because Node F (1410) previously stored parity chunk [P2], NodeA (1400) also requests that Node F (1410) transmit a copy of [P2] toNode E (1408) and remove the copy of [P2] from Node F (1410) [7].Finally, Node A (1400) determines that [P1] needs to be relocatedbecause Node D (1406) is more than two hops away from Node A (i.e., itis not directly connected to an immediate neighbor of Node A).Accordingly, Node A (1400) requests that Node D (1406) transmit a copyof [P1] to Node E (1408) and remove the copy of [P1] from Node D (1406)[8]. All of the aforementioned communications may be transmitted betweenthe nodes using the node-specific DPD information from one or morenodes. The result of the aforementioned rebuilding of data chunk [C_(r)]and data chunk [F_(r)] and the relocation of the parity chunks is shownin FIG. 14.3.

FIG. 15 shows a flowchart of a method of storing data in nodes inaccordance with one or more embodiments of the invention. Further, themethod shown in FIG. 15 may be performed by the node management engine(or another component) in the node.

The method shown in FIG. 15 relates to storing an update to erasurecoded data in a manner that limits the transmission of data chunks andparity chunks between nodes in the cluster while still maintaining thedata protection provided by the erasure code scheme.

While FIG. 15 is illustrated as a series of steps, any of the steps maybe omitted, performed in a different order, additional steps may beincluded, and/or any or all of the steps may be performed in a paralleland/or partially overlapping manner without departing from theinvention.

In Step 1500, an updated data chunk is received by a node. The node thatreceived the updated data chunk is currently also storing the data chunk(i.e., the corresponding previous version of the data chunk). Theupdated data chunk may be received from an external entity (e.g., a dataprocessor, a SoFS, a client, etc.) that is: (i) aware of the location ofthe data chunks in the cluster and (ii) is able to determine that theupdated data chunk corresponds to a previous version of the data chunkcurrently stored on the node.

In Step 1502, the node that is currently storing the correspondingparity chunk is identified. More specifically, the updated data chunkreceived in step 1500 is part of a slice, where the slice includes datachunks and at least one parity chunk. Thus, the node identified in step1502 corresponds to the node that is storing the parity chunk that ispart of the same slice as the previous version of the data chunk, whichthe updated data chunk is replacing.

The node that received the updated data chunk may identify the nodestoring the corresponding parity chunk using information about slicesstored in the cluster. For example, each node may include informationabout all of the slices stored in the cluster, where the informationincludes the data chunks and parity chunks associated with each sliceand the location of each of the aforementioned data chunks and paritychunks in the cluster. Alternatively, or additionally, the node mayrequest information from an external entity (e.g., a SoFS, a client, adata processor, etc.) about the node that is currently storing thecorresponding parity chunk. Alternatively, or additionally, the node mayrequest information about the node that is currently storing thecorresponding parity chunk from other nodes in the cluster. The requeststo the other nodes may be sent using node-specific DPD information.

In Step 1504, the updated data chunk and the previous version of thedata chunk are transmitted to the node identified in step 1502. Thetransmission of the updated data chunk and the previous version of thedata chunk may be performed using the DPD information (which may benode-specific DPD information or aggregated DPD information) in order tominimize the number of hops the updated data chunk and the previousversion of the data chunk must make prior to reaching the identifiednode.

In Step 1506, the previous version of the data chunk is over writtenwith the updated data chunk. Step 1506 is performed on the node thatoriginally received the updated data chunk.

In Step 1508, the identified node that received the updated data chunkand the previous version of the data chunk generates an updated paritychunk using the updated data chunk, the previous version of the datachunk, and the parity value currently stored in the identified node.

In Step 1510, the updated parity chunk (which includes the updatedparity value generated in step 1508) is stored in the identified node.Further, the updated data chunk, the previous version of the data chunk,and the previous parity chunk (i.e., the parity chunk previously storedon the identified node) are deleted.

FIGS. 16.1-16.3 show diagrams of an example of storing data in nodes inaccordance with one or more embodiments of the invention. The inventionis not intended to limit the scope of the invention.

Turning to the example, consider a scenario in which there are six nodes(Node A (1600), Node B (1602), Node C (1604), Node C (1606), Node E(1608), Node F (1610)) arranged in a single-chain configuration usingcommunication interfaces (CIs) (1612, 1614, 1616, 1618, 1620, 1622,1624, 1626, 1628, 1630, 1632, and 1634).

In this scenario, Node B (1602) receives an updated data chunk [A′][1].In order to maintain the erasure coding scheme, the parity value [P1]needs to be updated as data chunk [A] has been updated to data chunk[A′]. If the parity value is not updated, then the slice that includesdata chunks [A′, B, C] is not protected by the erasure coding scheme.Accordingly, Node B (1602) subsequently determines, using the methoddescribed in FIG. 15, that Node D (1606) includes the correspondingparity chunk [P1].

Node B (1602), using the node-specific DPD information from one or morenodes, sends a copy of data chunks [A] and [A′] to Node D (1606) [2].Data chunks [A] and [A′] may be sent as a single write, where the sizeof the data transferred during the write is sufficient to enable datachunks [A] and [A′] to be transferred together. Node B (1602)subsequently deletes (or removes) its copy of data chunk [A] [3].Finally, Node D (1606) calculates the updated parity chunk [P1′] usingdata chunk [A], data chunk [A′], and parity chunk [P1]. The updatedparity chunk [P1′] is stored in Node D (1606) and copies of data chunk[A], data chunk [A′], and parity chunk [P1] are deleted (or removed)from Node D [4].

The example shown in FIGS. 16.1-16.3 may reduce the number of reads andwrites required to generate a new parity chunk. Specifically, theexample shown in FIGS. 16.1-16.3 only requires a single write of datachunks [A] and [A′] to Node D and then a single write of the updatedparity chunk to the node that calculated the parity chunk (e.g., storingthe updated parity chunk in persistent storage on the node), where thewriting of the updating parity chunk [P1] does not require [P1′] to betransferred to another node. Prior approaches to update the parity chunktypically included obtaining data chunks [B] and [C] by Node B (1602),which then calculates the updated parity chunk [P1′]. The updated paritychunk [P1′] would then be written to Node D (1606). Thus, thetraditional approach to calculating and storing an updated parity chunk[P1′] required obtaining (e.g., reading) to data chunks for other nodesand writing the updated parity chunk to another node as compared to onewrite in the method shown in FIGS. 16.1-16.3. Said another way, thetraditional approach required two data chunks and one updated paritychunk to be separately transmitted between nodes while variousembodiments of the method shown in FIGS. 16.1-16.3 only require a singlecombined transmission of two data chunks.

As discussed above, embodiments of the invention may be implementedusing computing devices. FIG. 17 shows a diagram of a computing devicein accordance with one or more embodiments of the invention. Thecomputing device (1700) may include one or more computer processors(1702), non-persistent storage (1704) (e.g., volatile memory, such asrandom access memory (RAM), cache memory), persistent storage (1706)(e.g., a hard disk, an optical drive such as a compact disk (CD) driveor digital versatile disk (DVD) drive, a flash memory, etc.), acommunication interface (1712) (e.g., Bluetooth interface, infraredinterface, network interface, optical interface, etc.), input devices(1710), output devices (1708), and numerous other elements (not shown)and functionalities. Each of these components is described below.

In one embodiment of the invention, the computer processor(s) (1702) maybe an integrated circuit for processing instructions. For example, thecomputer processor(s) may be one or more cores or micro-cores of aprocessor. The computing device (1700) may also include one or moreinput devices (1710), such as a touchscreen, keyboard, mouse,microphone, touchpad, electronic pen, or any other type of input device.Further, the communication interface (1712) may include an integratedcircuit for connecting the computing device (1700) to a network (notshown) (e.g., a local area network (LAN), a wide area network (WAN) suchas the Internet, mobile network, or any other type of network) and/or toanother device, such as another computing device.

In one embodiment of the invention, the computing device (1700) mayinclude one or more output devices (1708), such as a screen (e.g., aliquid crystal display (LCD), a plasma display, touchscreen, cathode raytube (CRT) monitor, projector, or other display device), a printer,external storage, or any other output device. One or more of the outputdevices may be the same or different from the input device(s). The inputand output device(s) may be locally or remotely connected to thecomputer processor(s) (1702), non-persistent storage (1704), andpersistent storage (1706). Many different types of computing devicesexist, and the aforementioned input and output device(s) may take otherforms.

Embodiments of the invention may provide a computationally efficientmethod for managing data in a storage system. More specifically,embodiments of the invention may enable one or more of the following:(i) storage of data using dynamically updated node configurationinformation; (ii) dynamic implementation of various data protectionschemes using dynamically updated node connectivity information; (iii)implementation of various data protection schemes at the node levelwithout required external management of the nodes; (iv) placement ofdata in the nodes based on dynamically updated node connectivityinformation; and (v) efficient rebuilding and updating of data chunksand parity chunks.

Further, in one or more embodiments of the invention, by storing thedata and replicas in the manner described in FIGS. 8-11, the reading ofsuch data may also be improved. More specifically, by storing datachunks for a given replica (or copy of data) on a node and its immediateneighbors, the reading of such data (e.g., the reading of all of thedata chunks that make up a file) only requires reading data chunks froma node or from its immediate neighbors. This reduces the amount of timerequired to retrieve the data chunks as the data chunks are at most onehop from the node that received the request. Further, in variousembodiments of the invention, by physically separating the replica pathsand the chunk paths, the data chunks may be obtained more efficientlyfrom the immediate neighbors via the chunk paths.

Further, in one or more embodiments of the invention, by storing theerasure coded data in the manner described in FIGS. 12-14.3, the readingof such data may also be improved. More specifically, by storing datachunks for a slice on a node and its immediate neighbors, the reading ofsuch data (e.g., the reading of all of the data chunks that make up theslice) only requires reading data chunks from a node or from itsimmediate neighbors. This reduces the amount of time required toretrieve the data chunks as the data chunks are at most one hop from thenode that received the request. Further, if the node needs to rebuild adata chunk(s), then the close proximity of the data chunks that arerequired for the rebuilding of the lost data chunks reduces the amountof overhead required to retrieve the data chunks.

One or more embodiments of the invention may be implemented usinginstructions executed by one or more processors of the data managementdevice. Further, such instructions may correspond to computer readableinstructions that are stored on one or more non-transitory computerreadable mediums.

While the invention has been described above with respect to a limitednumber of embodiments, those skilled in the art, having the benefit ofthis disclosure, will appreciate that other embodiments can be devisedwhich do not depart from the scope of the invention as disclosed herein.Accordingly, the scope of the invention should be limited only by theattached claims.

What is claimed is:
 1. A method for managing data, comprising:receiving, by a node, an updated data chunk, wherein the node comprisinga data chunk, wherein the data chunk is a prior version of the updateddata chunk; identifying a second node comprising a parity chunkassociated with the data chunk; transmitting, by the node, the datachunk and the updated data chunk to the second node; generating, thesecond node, an updated parity chunk using the data chunk and theupdated data chunk; and storing the updated parity chunk on the secondnode.
 2. The method of claim 1, further comprising: deleting the datachunk on the node.
 3. The method of claim 1, further comprising:deleting the data chunk, the updated data chunk, and the parity chunkfrom the second node after the updated parity chunk is generated on thesecond node.
 4. The method of claim 1, wherein the second node isidentified by the node.
 5. The method of claim 1, wherein the node andthe second node are connected in a single-chain configuration.
 6. Themethod of claim 1, wherein the node and the second node are connected ina dual-chain configuration.
 7. The method of claim 1, wherein the nodeand the second node are members of a cluster; and wherein the data chunkand the parity chunk are stored in the cluster using, at least in part,data protection domain (DPD) information.
 8. The method of claim 7,wherein the DPD information specifies immediate neighbor nodes of thenode; and wherein the second node is not an immediate neighbor node ofthe node.
 9. A non-transitory computer readable medium comprisingcomputer readable program code, which when executed by a computerprocessor enables the computer processor to perform a method for storingdata, a method comprising: receiving, by a node, an updated data chunk,wherein the node comprising a data chunk, wherein the data chunk is aprior version of the updated data chunk; identifying a second nodecomprising a parity chunk associated with the data chunk; transmitting,by the node, the data chunk and the updated data chunk to the secondnode; generating, the second node, an updated parity chunk using thedata chunk and the updated data chunk; and storing the updated paritychunk on the second node.
 10. The non-transitory computer readablemedium of claim 9, further comprising: deleting the data chunk on thenode.
 11. The non-transitory computer readable medium of claim 9,further comprising: deleting the data chunk, the updated data chunk, andthe parity chunk from the second node after the updated parity chunk isgenerated on the second node.
 12. The non-transitory computer readablemedium of claim 9, wherein the second node is identified by the node.13. The non-transitory computer readable medium of claim 9, wherein thenode and the second node are connected in a single-chain configuration.14. The non-transitory computer readable medium of claim 9, wherein thenode and the second node are connected in a dual-chain configuration.15. The non-transitory computer readable medium of claim 9, wherein thenode and the second node are members of a cluster; and wherein the datachunk and the parity chunk are stored in the cluster using, at least inpart, data protection domain (DPD) information.
 16. The non-transitorycomputer readable medium of claim 15, wherein the DPD informationspecifies immediate neighbor nodes of the node; and wherein the secondnode is not an immediate neighbor node of the node.
 17. A system,comprising: a first physical node comprising a data chunk; and a secondphysical node comprising a parity chunk, wherein the first physical nodeis configured to: receive an updated data chunk, wherein the data chunkis a prior version of the updated data chunk; identify that the secondnode comprises the parity chunk; transmit the data chunk and the updateddata chunk to the second physical node; and wherein the second physicalnode is configured to: generate an updated parity chunk using the datachunk and the updated data chunk; and store the updated parity chunk onthe second physical node.
 18. The system of claim 17, wherein the secondphysical node is further configured to: delete the data chunk, theupdated data chunk, and the parity chunk from the second physical nodeafter the updated parity chunk is generated on the second physical node.19. The system of claim 17, wherein the data chunk and the parity chunkare stored on the first physical node and the second physical node,respectively, using, at least in part, data protection domain (DPD)information.
 20. The system of claim 19, wherein the DPD informationspecifies immediate neighbor nodes of the first physical node; andwherein the second physical node is not an immediate neighbor node ofthe first physical node.